package com.wodsy.phoenix.dataobject.orderc.model;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Item entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_item", catalog = "orderc")
public class Item extends PhoenixObject {

	// Fields

	private Integer id;
	private Long orderId;
	private Integer goodsId;
	private String goodsName;
	private Integer skuId;
	private Integer skuCount;
	private Double skuSalePrice;
	private Date createTime;
	private Date updateTime;
	private Double skuDealPrice;

	// Constructors

	/** default constructor */
	public Item() {
	}

	/** minimal constructor */
	public Item(Long orderId, Integer goodsId, Integer skuId, Integer skuCount,
			Date createTime) {
		this.orderId = orderId;
		this.goodsId = goodsId;
		this.skuId = skuId;
		this.skuCount = skuCount;
		this.createTime = createTime;
	}

	/** full constructor */
	public Item(Long orderId, Integer goodsId,String goodsName, Integer skuId, Integer skuCount,
			Double skuSalePrice, Date createTime, Date updateTime,
			Double skuDealPrice) {
		this.orderId = orderId;
		this.goodsId = goodsId;
		this.goodsName = goodsName;
		this.skuId = skuId;
		this.skuCount = skuCount;
		this.skuSalePrice = skuSalePrice;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.skuDealPrice = skuDealPrice;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "order_id", nullable = false)
	public Long getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	@Column(name = "goods_id", nullable = false)
	public Integer getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}

	@Column(name = "goods_name", nullable = false)
	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	@Column(name = "sku_id", nullable = false)
	public Integer getSkuId() {
		return this.skuId;
	}

	public void setSkuId(Integer skuId) {
		this.skuId = skuId;
	}

	@Column(name = "sku_count", nullable = false)
	public Integer getSkuCount() {
		return this.skuCount;
	}

	public void setSkuCount(Integer skuCount) {
		this.skuCount = skuCount;
	}

	@Column(name = "sku_sale_price", precision = 22, scale = 0)
	public Double getSkuSalePrice() {
		return this.skuSalePrice;
	}

	public void setSkuSalePrice(Double skuSalePrice) {
		this.skuSalePrice = skuSalePrice;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_time", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "sku_deal_price", precision = 22, scale = 0)
	public Double getSkuDealPrice() {
		return this.skuDealPrice;
	}

	public void setSkuDealPrice(Double skuDealPrice) {
		this.skuDealPrice = skuDealPrice;
	}

}